package com.goktech.olala.server.dao.customer;

import com.goktech.olala.server.pojo.customer.CtmLogin;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author wyn
 */
public interface CtmLoginMapper {
    /**
     * 新增
     * @param record
     * @return
     * @throws Exception
     */
    int insert(CtmLogin record) throws Exception;

    /**
     * 查询所有
     * @return
     * @throws Exception
     */
    List<CtmLogin> selectAll() throws Exception;

    /**
     * 根据用户名密码查询
     * @param userName
     * @param pwd
     * @return
     * @throws Exception
     */
    CtmLogin selectByParam(@Param("userName") String userName, @Param("pwd") String pwd) throws Exception;

    /**
     * 更新
     * @param record
     * @return
     * @throws Exception
     */
    int updateByPrimaryKey(CtmLogin record) throws Exception;

    /**
     * 根据登录名查询信息
     * @param ctmLoginName
     * @return
     * @throws Exception
     */
    CtmLogin findInfoByLoginName(String ctmLoginName) throws Exception;

}